import Vue from 'vue'
import App from './App.vue'
import router from './router'
import store from './store'
import Vuex from 'vuex'

Vue.use(Vuex)
//全局加载中引入
import './components/global/Loading';
import api from './api'
import VueLazyload from "vue-lazyload";
// 懒加载的模块引入到 vue类中
Vue.use(VueLazyload, {
  loading:require( "./assets/img/2.jpg"), //加载中图片，一定要有，不然会一直重复加载占位图
  error:require( "./assets/img/2.jpg"), //加载失败图片
});

Vue.prototype.$api = api
const eventBus = new Vue()
Vue.prototype.$eventBus=eventBus

Vue.config.productionTip = false

new Vue({
  router,
  store,
  render: h => h(App)
}).$mount('#app')
